CC = gcc
CFLAGS = -Wall -O -g
AR = ar
AFLAGS = -r
LFLAGS = -lSDL -lSDL_image -lSDL_ttf -lSDL_mixer

SOUCE_FILES = $(wildcard *.c)
OBJS = $(patsubst %.c,%.o,$(SOUCE_FILES))
TARGET = scripter.a

%.o : %.c %.h
	$(CC) -c $(CFLAGS) $< -o $@

%.o : %.c
	$(CC) -c $(CFLAGS) $< -o $@

$(TARGET): $(OBJS)
	$(AR) $(AFLAGS) $(TARGET) $(OBJS)
	mv $(TARGET) ..

.PHONY:clean
clean:
	$(RM) $(TARGET) $(OBJS)

